package com.sjyp.cms.routes;

import com.jfinal.config.Routes;
import com.sjyp.cms.commons.interceptor.FrontCurrentNavInterceptor;
import com.sjyp.cms.controller.fornt.*;

public class FrontRoutes extends Routes {
    @Override
    public void config() {
        //用于为该 Routes 内部的所有 Controller 设置视图渲染时的基础路径.
        //该基础路径与 Routes.add(…, viewType)方法传入的 viewPath 以及 Controller.render(view) 方法传入的 view 参数联合组成最终的视图路径
        //规则如下：finalView = baseViewPath + viewPath + view
        //当view 以 “/” 开头时，前两个被忽略
        this.setBaseViewPath("/pages/front");
        this.addInterceptor(new FrontCurrentNavInterceptor());
        this.add("/", IndexController.class,""); //首页
        this.add("/cases", CaseController.class,"");//案例
        this.add("/cooperation", CooperationController.class,"");//合作 加盟
        this.add("/dailyChemicals", DailyChemicalsController.class,"");//日化
        this.add("/services", ServicesController.class,""); //服务项目
        this.add("/about", AboutController.class,"");//关于我们
        this.add("/training", TrainingController.class,"");//技术 培训
    }
}
